import java.util.GregorianCalendar;

public class UE extends Course implements ExcercicesInterface {
	private Excercises excercices;
	
	public UE(String lvanr, String title, double ects, double workinghours, GregorianCalendar enrollStart, GregorianCalendar enrollEnd, GregorianCalendar checkOutEnd, Professor professor, boolean visible, int number, int maxStudents) {
		super(lvanr, title, ects, workinghours, enrollStart, enrollEnd, checkOutEnd, professor, visible);
		this.excercices = new Excercises(this, number, maxStudents);
	}
	
	public UE(String lvanr, String title, double ects, double workinghours, GregorianCalendar enrollStart, GregorianCalendar enrollEnd, GregorianCalendar checkOutEnd, Professor professor, boolean visible) {
		super(lvanr, title, ects, workinghours, enrollStart, enrollEnd, checkOutEnd, professor, visible);
		this.excercices = new Excercises();
	}

	public UE(String lvanr, String title, double ects, double workinghours, GregorianCalendar enrollStart, GregorianCalendar enrollEnd, GregorianCalendar checkOutEnd, Professor professor, int number, int maxStudents) {
		super(lvanr, title, ects, workinghours, enrollStart, enrollEnd, checkOutEnd, professor);
		this.excercices = new Excercises(this, number, maxStudents);
		
	}

	public UE(String lvanr, String title, double ects, double workinghours, GregorianCalendar enrollStart, GregorianCalendar enrollEnd, GregorianCalendar checkOutEnd, Professor professor) {
		super(lvanr, title, ects, workinghours, enrollStart, enrollEnd, checkOutEnd, professor);
		this.excercices = new Excercises();
	}
	
	@Override
	public Excercises getExcercices() {
		return excercices;
	}

	@Override
	public void giveCertificate(Student student) {
		student.addCertificate(new Certificates(this, this.excercices.finalMarks.get(student), this.getProfessor()));
	}
}
